#ifndef IM_COREAPI_H
#define IM_COREAPI_H

/**
 * @brief 业务核心 api
 *
 */
#include <QObject>
#include "Control/FriendAndSessionListControl.h"
namespace IM_GUI_KIT {
    class IM_CoreApi:public QObject
    {
        Q_OBJECT
    public:
        ~IM_CoreApi();
        static IM_CoreApi *Instance(){
            static IM_CoreApi api;
            return &api;
        }
        FriendAndSessionListControl *getListControl();
        void setMyUid(const QString &uid);
        QString getMyUid() const;

        // 设置列表api 的 指针用于回调之时注册事件
        void setListApiPort(QObject* api);
        QObject* getListApiPort();
    private:
        QString myUId;// 记录我的 id
        QObject* listApiPort;
        IM_CoreApi();
        FriendAndSessionListControl *listControl;
    };
}

#endif // IM_COREAPI_H
